package com.tyoj.tyojbackendclient.service;

import com.tyoj.model.entity.Question;
import com.tyoj.model.entity.QuestionThumb;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author WangJiyou
 * @description 针对表【question(题目)】的数据库操作Service
 * @createDate 2024-06-06 11:14:20
 */
@FeignClient(name = "tyoj-backend-client", path = "/api/question/inner")
public interface QuestionFeignClient {


    @GetMapping("/get/id")
    Question getQuestionById(@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/id")
    QuestionThumb getQuestionSubmitById(@RequestParam("questionSubmitId") long questionSubmitId);


    @PostMapping("/question_submit/update")
    Boolean updateQuestionSubmitById(@RequestBody QuestionThumb updateQuestionSubmit);


}
